<?php
/**
 * True Gallery Userpanel template file
 *
 * @version 2.5
 * @author Alexey N. Brin (userxp@joomlaportal.ru)
 * @homepage http://truegallery.ru 
 * @filename userpanel.tpl.php
 * @package True Gallery
 * @copyright (C) 2008-2009 by joomlatune.ru
 * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
 * 
 * THIS GALLERY is an EVOLUTION of AkoGallery -> PonyGallery -> DatsoGallery
 *
 * If you fork this to create your own project, 
 * please make a reference to True Gallery someplace in your code 
 * and provide a link to http://www.joomlatune.ru
 *
 **/

defined('_VALID_MOS') or defined('_JEXEC') or die('Direct Access to this location is not allowed.');

?>
<?php if( $ad_comtitle ) { ?>
	<div class="componentheading">
		<div id="comtitle">
		<?php echo JText::_('TG_GALLERY'); ?>
		</div>
		<div class="loading"></div>
	</div>
<?php } ?>

<?php if( $category_pathway_link ) { ?>
	<div class="tg_pathway">
		<?php echo $category_pathway_link; ?>
	</div>
<?php } ?>

<?php
// $ad_showpanel = true;
// $ad_userpannel = true;
// $ad_special = true;
// $ad_rating = true;
// $ad_lastadd = true;
?>
<style>
.<?php echo $class;?> {
	color:#369;
	font-weight:bold;
	text-decoration: none;
}
.<?php echo $class;?> a {
	text-decoration: none;
}
</style>
<?php if( $ad_showpanel ) { ?>
<div id="toolbar-box">
	
	<div class="t">
		<div class="t">
			<div class="t"></div>
		</div>
	</div>
	
	<div class="m">
		<div class="toolbar" id="toolbar">
			
			<?php if( $ad_search ) { ?>
				<div class="tg_search">
					<form action="<?php echo $searchlink; ?>" name="searchgalform" target="_top" method="post">
						<input type="hidden" name="option"  value="<?php echo TG_CMP; ?>" />
						<input type="hidden" name="Itemid"  value="<?php echo $Itemid; ?>" />
						<input type="hidden" name="task"    value="search" />
						<input type="hidden" name="sorting" value="find" />
						<input type="text"   name="sstring" class="inputbox" size="30"
							onblur="if(this.value=='') this.value='';" 
							onfocus="if(this.value=='<?php echo JText::_('TG_SEARCH'); ?>') this.value='';" 
							value="<?php echo JText::_('TG_SEARCH'); ?>" />
					</form>
					<!--
					<form action="index.php?option=com_search" name="searchgalform" target="_top" method="get">
						<input type="hidden" name="option"      value="com_search" />
						<input type="hidden" name="areas[0]"    value="gallery" />
						<input type="hidden" name="limit"       value="20" />
						<input type="hidden" name="ordering"    value="alpha" />
						<input type="hidden" name="searchphrase"  value="all" />
						<input type="text"   name="searchword" class="inputbox" size="30"
							onblur="if(this.value=='') this.value='';" 
							onfocus="if(this.value=='<?php echo JText::_('TG_SEARCH'); ?>') this.value='';" 
							value="<?php echo JText::_('TG_SEARCH'); ?>" />
					</form> -->
				</div>
				<div class="tg_clear"></div>
			<?php } ?>
			<?php if( $my->username && $ad_userpannel) { $lo->task = 'author'; ?>
				<span class="up_userpanel"><a href="<?php echo getTGLink($lo); ?>"><?php echo JText::_('TG_USER_PANEL'); ?></a></span> | 
			<?php } ?>
			<?php if( $ad_special ) { $lo->task = 'popular'; ?>
				<span class="up_popular"><a href="<?php echo getTGLink($lo); ?>"><?php echo JText::_('TG_MOST_VIEWED'); ?></a></span> | 
			<?php } ?>
			<?php if( $ad_rating ) { $lo->task = 'best'; ?>
				<span class="up_best"><a href="<?php echo getTGLink($lo); ?>"><?php echo JText::_('TG_TOP_RATED'); ?></a></span> | 
			<?php } ?>
			<?php if( $ad_lastadd ) { $lo->task = 'recent'; ?>
				<span class="up_recent"><a href="<?php echo getTGLink($lo); ?>"><?php echo JText::_('TG_LAST_ADDED'); ?></a></span> | 
			<?php } ?>
			<?php if( $ad_lastcomment && $ad_showcomment == '1' ) {
				$comments = JTuneConfig::getCfg( 'absolute_path' ).DSX.'components'.DSX.'com_jcomments'.DSX.'jcomments.php';
				if( file_exists($comments) ) { $lo->task = 'special'; $lo->sorting = 'lastcomment'; ?>
					<span class="up_comments"><a href="<?php echo getTGLink($lo); ?>"><?php echo JText::_('TG_LAST_COMMENTED'); ?></a></span> | 
				<?php } ?>
			<?php } ?>
			<?php if( $ad_owners ) { $lo->task = 'authors'; ?>
				<span class="up_authors"><a href="<?php echo getTGLink($lo); ?>"><?php echo JText::_('TG_LAST_AUTHORS'); ?></a></span>
			<?php } ?>		
			<!--
			<div style="float:right">
				<label for="yoursonly"><?php echo JText::_('TG_YOURS_ONLY'); ?></label>&nbsp;
				<input type="checkbox" name="yoursonly" value="" title="<?php echo JText::_('TG_YOURS_ONLY_I'); ?>" checked="checked" />
			</div>
			-->
		</div>
		<div class="clr"></div>
	</div>
	
	<div class="b">
		<div class="b">
			<div class="b"></div>
		</div>
	</div>
	
</div>
<div class="clr"></div>
	
<?php } ?>